Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce new op types GPI, GPI2 and AAMS #1329

Closed
wants to merge 8 commits into from
Closed

Conversation

cqc-alec
Copy link
Collaborator

@cqc-alec cqc-alec commented Apr 9, 2024

Description

Add the IonQ native ops defined here.

Related issues

Closes #1259 .

Checklist

  • I have performed a self-review of my code.
  • I have commented hard-to-understand parts of my code.
  • I have made corresponding changes to the public API documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have updated the changelog with any user-facing changes.

@cqc-alec cqc-alec force-pushed the feature/newoptypes branch 2 times, most recently from 481bb61 to 15c6455 Compare April 9, 2024 14:00
More tests.
@cqc-alec cqc-alec changed the title Feature/newoptypes Introduce new op types GPI, GPI2 and AAMS Apr 9, 2024
@cqc-alec cqc-alec requested a review from yao-cqc April 9, 2024 15:36
@cqc-alec cqc-alec marked this pull request as ready for review April 9, 2024 15:36
Copy link
Contributor

@yao-cqc yao-cqc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Only a small problem with the docs

Comment on lines 200 to 210
":math:`(\\theta, \\phi_0, \\phi_1) \\mapsto \\left[ "
"\\begin{array}{cccc} \\cos\\frac{\\pi\\theta}{2} & 0 & 0 & "
"-ie^{-i\\pi{\\phi_0+\\phi_1}}\\sin\\frac{\\pi\\theta}{2} \\\\ "
"0 & "
"\\cos\\frac{\\pi\\theta}{2} & "
"-ie^{i\\pi{\\phi_0-\\phi_1}}\\sin\\frac{\\pi\\theta}{2} & 0 \\\\ 0 "
"& "
"-ie^{i\\pi{\\phi_0-\\phi_1}}\\sin\\frac{\\pi\\theta}{2} & "
"\\cos\\frac{\\pi\\theta}{2} & 0 \\\\ "
"-ie^{i\\pi{\\phi_0+\\phi_1}}\\sin\\frac{\\pi\\theta}{2} & 0 & 0 & "
"\\cos\\frac{\\pi\\theta}{2} \\end{array} \\right]`")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing parentheses in the exponents
e.g.
-ie^{-i\\pi{\\phi_0+\\phi_1}}\\sin\\frac{\\pi\\theta}{2} should be
-ie^{-i\\pi(\\phi_0+\\phi_1)}\\sin\\frac{\\pi\\theta}{2}
same problem in OpType.hpp

also the exponent of the second non-zero entry in the second row should be
i\pi(\phi_1-\phi_0) instead of i\pi(\phi_0-\phi_1)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good spot, thanks.

@cqc-alec cqc-alec requested a review from yao-cqc April 10, 2024 08:19
@cqc-alec
Copy link
Collaborator Author

PR has been merged, but PR status not updated for some reason.

@cqc-alec
Copy link
Collaborator Author

Closing this manually as github problems prevented it from being closed when merged.

@cqc-alec cqc-alec closed this Apr 11, 2024
daniel-mills-cqc pushed a commit that referenced this pull request Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add native IonQ OpTypes
2 participants